#include"cv.h"
#include"highgui.h"
#include <vector>
using namespace std;
class Detection
{
private:
int height,width,step,channels,Num;
int stepr, channelsr;
IplImage *result;
CvPoint *RedPoint,*GreenPoint,*BluePoint,*Head;
vector <CvPoint>Points;
vector<vector<CvPoint>> Segment;
uchar *data,*datar;
public:
Detection(IplImage* frame);
void DetectRed();
void DetectGreen();
void DetectBlue();
void DetectHead();
CvPoint* Segmentation(IplImage* img);
vector<CvPoint> GetPoints();
CvPoint* GetCenter(vector<CvPoint> Point);
CvPoint* RedPosition();
CvPoint* GreenPosition();
IplImage* GetResult();
CvPoint* HeadPosition();
vector<vector<CvPoint>> GetSegment();


};